home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
FM Towns: Free Software Collection 11
/
FM Towns Free Software Collection 11.iso
/
t_os
/
game
/
worm2
/
warm2g.bas
< prev
next >
Wrap
BASIC Source File
|
1995-08-19
|
8KB
|
200 lines
10 *準備
20 DIM BO%(4012),WA%(3980),CT%(1515)
30 LOAD@"BOMB.SND",BO%
40 LOAD@"SPLASH.SND",WA%
50 LOAD@"CTUIN.SND",CT%
60 LOAD@"FM_1.FMB"
70 CLS:GOSUB*おーぷにんぐ
80 LOCATE 24,10:PRINT" 音楽 : 桂&広安":WAIT 210
90 LOCATE 24,12:PRINT" アイデア : 淳平&綾太":WAIT 210
100 LOCATE 24,14:PRINT" プログラム : 新之介":WAIT 220
110 *たいとる
120 SCREEN@ 1:CLS:SCREEN@
130 FOR A=0 TO 10:LINE(A,A)-(320-A,240-A),PSET,[A*25,A*15,A*15],B:NEXT A
140 LINE(11,11)-(309,229),PSET,[60,120,80],BF
150 SYMBOL(35,50),"VS.みみ2ー",3,5,[100,30,250],,,12
160 WAIT 240:SYMBOL(180,100),"GREAT",3,3,[100,250,100],,,7
170 FOR A=0 TO 5:LINE(100+A,155+A)-(215-A,175-A),PSET,[A*50,A*50,A*50],B
180 NEXT A:LINE(105,160)-(210,170),PSET,0,BF
190 LOCATE 35,17:PRINT "PUSH RUN"
200 WA=0:DE=100:M=0
210 IF PTRIG(1)+PTRIG(2)<>4 THEN GOTO 210
220 *もーど選択
230 SCREEN@ 1:CLS:WAIT 50
240 MM=0:MN=5 '------MN=モードの数
250 FOR A=0 TO 10:LINE(A,A)-(320-A,240-A),PSET,[A*25,A*15,A*15],B:NEXT A
260 RESTORE *もーど選択:FOR A=0 TO MN:READ MO$(A):NEXT A
270 DATA "爆弾投下デスマッチ","密室浸水デスマッチ","位置交換デスマッチ"
280 DATA "恐怖転送デスマッチ","反射光線デスマッチ"," ノーマルゲーム "
290 DATA
300 SYMBOL(89,30)," 開始 ",1,1,7',,,1
310 SYMBOL(89,70)," モード",1,1,7',,,1
320 SYMBOL(89,90),MO$(M),1,1,7',,,1
330 SYMBOL(89,110)," 難易度変更 ",1,1,7',,,1
340 SYMBOL(135,130),STR$(200-DE),1,1,7',,,1
350 SYMBOL(89,150)," ウェイト変更",1,1,7',,,1
360 SYMBOL(135,170),STR$(WA),1,1,7',,,1
370 SYMBOL(89,190)," 終了",1,1,7',,,1
380 FOR A=0 TO 180 STEP 8
390 LINE(80,A+30)-(240,A+38),AND,[0,A*1.4!,255-A*1.4!],BF:NEXT A
400 P=PTRIG(1)+PTRIG(2):T=PAD(1)+PAD(2)
410 LINE(80,MM*40+29)-(238,MM*40+49),PSET,[200,200,200],B:WAIT 5
420 LINE(80,MM*40+29)-(238,MM*40+49),PSET,0,B
430 IF T=1 THEN MM=MM+(MM<>0):PCMPLAY BO%
440 IF T=5 THEN MM=MM-(MM<>4):PCMPLAY BO%
450 IF T=3 THEN ON MM GOSUB *もーど+,*難易度+,*ウェイト+
460 IF T=7 THEN ON MM GOSUB *もーど-,*難易度-,*ウェイト-
470 IF P=0 THEN GOTO 400
480 IF MM=4 THEN GOTO *終わり
490 IF MM=0 THEN GOTO *設定
500 GOTO 400
510 *もーど+
520 IF M=MN THEN RETURN
530 SYMBOL(89,90),MO$(M),1,1,0:M=M+1:SYMBOL(89,90),MO$(M),1,1,7
540 RETURN
550 *もーど-
560 IF M=0 THEN RETURN
570 SYMBOL(89,90),MO$(M),1,1,0:M=M-1:SYMBOL(89,90),MO$(M),1,1,7
580 RETURN
590 *難易度+
600 IF DE=<0 THEN RETURN
610 SYMBOL(135,130),STR$(200-DE),1,1,0:DE=DE-10:
620 SYMBOL(135,130),STR$(200-DE),1,1,7:RETURN
630 *難易度-
640 IF DE=>200 THEN RETURN
650 SYMBOL(135,130),STR$(200-DE),1,1,0:DE=DE+10:
660 SYMBOL(135,130),STR$(200-DE),1,1,7:RETURN
670 *ウェイト+
680 IF WA=>500 THEN RETURN
690 SYMBOL(135,170),STR$(WA),1,1,0:WA=WA+10:
691 SYMBOL(135,170),STR$(WA),1,1,7:RETURN
700 *ウェイト-
710 IF WA=<0 THEN RETURN
720 SYMBOL(135,170),STR$(WA),1,1,0:WA=WA-10
721 SYMBOL(135,170),STR$(WA),1,1,7:RETURN
730 *終わり:FOR A=0 TO 40:PCMPLAY CT%:WAIT 3:NEXT A:END
740 *設定
750 RANDOMIZE TINE
760 PCMPLAY WA%:WAIT 70:LINE(11,11)-(309,229),PSET,0,BF:PLAY OFF
770 XI(0)=0:XI(1)=0:YI(0)=1:YI(1)=-1:B=0:BB=1
780 X(0)=50:Y(0)=50:X(1)=270:Y(1)=190:
790 T=0 '---タイマー
800 ON M+1 GOTO *爆弾準備,*浸水準備,*交換準備,*移動準備,*反射準備
810 *爆弾準備
820 GOTO *めいん
830 *浸水準備
840 BX(0)=11:BY(0)=11:GOTO *めいん
850 *交換準備
860 GOTO *めいん
870 *移動準備
880 GOTO *めいん
890 *反射準備
900 FOR A=0 TO 9
910 BX(A)=60+RND*200
920 BY(A)=60+RND*120
930 BXI(A)=SGN(RND*2-1)
940 BYI(A)=SGN(RND*2-1)
950 NEXT A
960 GOTO *めいん
970 *めいん
980 FOR WW=0 TO WA*10:NEXT WW:T=T+1:SWAP B,BB
990 IF PLAY(0)=0 THEN ON ((M+1) MOD 2)+1 GOSUB *音楽1,*音楽2
1000 IF PTRIG(B+1)=1 THEN I(B)=3 ELSE I(B)=1
1010 P=PAD(B+1):PP=PTRIG(B+1)
1020 I(B)=-(PP<>1)-(PP=1)*3
1030 ON P GOSUB *上,*右上,*右,*右下,*下,*左下,*左,*左上
1040 X(B)=X(B)+XI(B)*I(B):Y(B)=Y(B)+YI(B)*I(B)
1050 IF I(B)=1 THEN 1090
1060 IF POINT(X(B)-SGN(XI(B)),Y(B)-SGN(YI(B)))+POINT(X(B),Y(B))+POINT(X(B)+SGN(XI(B)),Y(B)+SGN(YI(B)))<>0 THEN GOTO *END
1070 LINE(X(B)-SGN(XI(B))-1,Y(B)-SGN(YI(B))-1)-(X(B)-SGN(XI(B))+1,Y(B)-SGN(YI(B))+1),PSET,[80,255*B,255*(1-B)],B
1080 GOTO 1110
1090 IF POINT(X(B),Y(B))<>0 THEN GOTO *END
1100 PSET(X(B),Y(B)),[80,255*B,255*(1-B)]
1110 ON M+1 GOSUB *爆弾,*浸水,*交換,*移動,*反射
1120 GOTO 980
1130 *上 IF XI(B)= 0 AND YI(B)= 1 THEN RETURN
1140 XI(B)= 0:YI(B)=-1:RETURN
1150 *右上 IF XI(B)=-1 AND YI(B)= 1 THEN RETURN
1160 XI(B)= 1:YI(B)=-1:RETURN
1170 *右 IF XI(B)=-1 AND YI(B)= 0 THEN RETURN
1180 XI(B)= 1:YI(B)= 0:RETURN
1190 *右下 IF XI(B)=-1 AND YI(B)=-1 THEN RETURN
1200 XI(B)= 1:YI(B)= 1:RETURN
1210 *下 IF XI(B)= 0 AND YI(B)=-1 THEN RETURN
1220 XI(B)= 0:YI(B)= 1:RETURN
1230 *左下 IF XI(B)= 1 AND YI(B)=-1 THEN RETURN
1240 XI(B)=-1:YI(B)= 1:RETURN
1250 *左 IF XI(B)= 1 AND YI(B)= 0 THEN RETURN
1260 XI(B)=-1:YI(B)= 0:RETURN
1270 *左上 IF XI(B)= 1 AND YI(B)= 1 THEN RETURN
1280 XI(B)=-1:YI(B)=-1:RETURN
1290 *END
1300 IF I(B)=1 THEN 1320
1310 LINE(X(B)-SGN(XI(B))-1,Y(B)-SGN(YI(B))-1)-(X(B)-SGN(XI(B))+1,Y(B)-SGN(YI(B))+1),PSET,[80,255*B,255*(1-B)],B:GOTO 1330
1320 PSET(X(B),Y(B)),[80,255*B,255*(1-B)]
1330 BEEP 1:WAIT 20:BEEP 0:FOR C=0 TO 16
1340 CIRCLE(X(B),Y(B)),C,[5*C,C*12*B,C*12*(1-B)]:NEXT C
1350 FOR C=16 TO 0 STEP -1
1360 CIRCLE(X(B),Y(B)),C,[5*C,C*12*B,C*12*(1-B)],,,,F,PASTEL:NEXT C
1370 SYMBOL(40,50),STR$(BB+1)+"PLAYERの勝ち",2,2,[200,130,200],,,5
1380 IF B=1 THEN P1=P1+1
1390 IF B=0 THEN P2=P2+1
1400 SYMBOL(70,80),STR$(P1),2,2,[150,50,250],,,5
1410 SYMBOL(130,80)," 対 ",2,2,[150,250,250],,,5
1420 SYMBOL(190,80),STR$(P2),2,2,[150,250,50],,,5
1430 B=PTRIG(1)+PTRIG(2):IF B=0 THEN GOTO 1430
1440 GOTO *もーど選択
1450 *爆弾
1460 IF T MOD (DE+1)<>0 THEN RETURN
1470 CIRCLE(RND(-RND)*320,RND(RND)*240),16,[80,250,0],,,,F
1480 PCMPLAY BO%:RETURN
1490 *浸水
1500 IF T MOD (DE+1)<>0 THEN RETURN
1510 LINE(BX(0),BY(0))-(320-BX(0),240-BY(0)),PSET,[80,0,250],B
1520 LINE(BX(0)+1,BY(0)+1)-(319-BX(0),239-BY(0)),PSET,[80,0,250],B
1530 BX(0)=BX(0)+2:BY(0)=BY(0)+2:PCMPLAY WA%:RETURN
1540 *交換
1550 IF T MOD (DE+1)<>0 THEN RETURN
1560 SWAP X(0),X(1):SWAP Y(0),Y(1)
1570 SWAP XI(0),XI(1):SWAP YI(0),YI(1)
1580 PCMPLAY CT%:RETURN
1590 *移動
1600 IF T MOD (DE+1)<>0 THEN RETURN
1610 X(1)=RND(-RND)*280+20:Y(1)=RND(RND)*200+20
1620 X(0)=RND(-RND)*280+20:Y(0)=RND(RND)*200+20
1630 PCMPLAY CT%:RETURN
1640 *反射
1650 FOR A=0 TO INT((200-DE)/50)
1660 BXI(A)=BXI(A)*(POINT(BX(A)+BXI(A),BY(A))*2+1)
1670 BYI(A)=BYI(A)*(POINT(BX(A),BY(A)+BYI(A))*2+1)
1680 PSET(BX(A),BY(A)),7:BX(A)=BX(A)+BXI(A):BY(A)=BY(A)+BYI(A)
1690 PSET(BX(A),BY(A)),3:NEXT A
1700 RETURN
1710 *音楽1
1720 PLAY OFF
1730 A$="T150O4L8@108V6((AA>C+EDDF+A<)3A4R4R4R4)2(GAGF+EF+E4)3GGGGG"
1740 B$="T150O4L8@15V6((EC+EC+F+DF+D)3A4R4R4R4)2(G<B>G<B>EC+EC+)3G"
1750 C$="T150O3L8@26V8((EEEEDDDD)3A4R4R4R4)2(DDDDEEEE)3D"
1760 D$="T150O3L8@37V13((CRCCCRC4)4)2(CRCCCRC4)3CRCCCRC"
1770 PLAY A$,B$,C$,D$
1780 RETURN
1790 *音楽2
1800 PLAY OFF
1810 A$="T150O5L8@108(CCCCCCCCDDDCR4R4)2(EEGEEEF+R)2GGFFEEDDC2"
1820 B$="T150O3L8@113R1R1EEEEEEEEFFFER4R4EEREEREFFRFFRF<BR>CC<BBAAGGF2"
1830 C$="T150O3L8@19R1R1C1D4C4R4R4G2E2G2E2G2A2G2"
1840 D$="T150O4L8@58V6R1R1(G2E2)3(G2E2)2G2E"
1850 E$="T150O4L8@91V5R1R1(C1&D2CR4.V3)3"
1860 F$="T150O4L8@91V5R1R1(E1&F2ER4.V3)3"
1870 PLAY A$,B$,C$,D$,E$,F$
1880 RETURN
1890 *おーぷにんぐ
1900 PLAY OFF:BGM 1
1910 A$="T80O4L8@20V6((C<BG2&G4>C<BA2&A4>)2CD2CE<B>CD2CE<B2AG2>)2&G2R2@22@V85C<BG2&G4>@V68C<BA2&A4>@V56C<BG2&G4>@V44C<BA2&A4>@V32C<BG2&G4>@V20C<BA2&A4>@V10C<BG2&G4>@V0C<BA2&A4>"
1920 B$="T80O4L8@90V7(R1R1)2CD2CE<B>CD2CE<B2AG2>(C<BG2R4>C<BA2R4>)2CD2CE<B>CD2CE<B2AG&G2>R2"
1930 C$="T80O6L8@9V6(R1R1)2CD2CE<B>CD2CE<B2AG2>(C<BG2R4>C<BA2R4>)2CD2CE<B>CD2CE<B2AG&G2>R2"
1940 D$="T80O3L8@113V5(R1R1)2(CCDDDDD4)2CCCC<BBBB>(CC<G2>R4CCD2R4)2(CCDDDDD4)2CCCC<BBBB&B2R2"
1950 E$="T80O3L8@108(R1R1)2(O3A>C4<A>EF4.)2(<GB>CCC<AB>C)4(<A>C4<A>EF4.)2(<GB>CCC<AB>C)2&C2R2"
1960 F$="T80O3L8@36R1R1R1V1(C]])4(C]])4@67O3C1V10(L8O3@36CRCC>@62C2@36C4CC)5L8O3@36CRCC>@62C2@36C4CC@36R2C4C4"
1970 PLAY A$,B$,C$,D$,E$,F$:RETURN